import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { HttpServiceProvider } from '../../providers/http-service/http-service';


@IonicPage()
@Component({
  selector: 'page-chongzhi',
  templateUrl: 'chongzhi.html',
})
export class ChongzhiPage {

  	data:any = {btype:'0', saddr:'', raddr:'622za7cv2abd22hshda', asset:'', flag:''}
    bcoinlist = [] //钱包种类

  	constructor(public navCtrl: NavController, public navParams: NavParams,public http: HttpServiceProvider) {

    }

    chongzhi(){
      this.http.chongzhi(this.data, (result)=>{
        console.log(result)
        this.navCtrl.push('BillPage')
      })
    }

    bcoin(){
      this.http.bcoinlist((result)=>{
        this.bcoinlist = result.list
      })
    }

  	ionViewDidLoad() {
    	this.bcoin()
  	}

}
